JavaScript
{dialog.object}getWindow Method
Syntax
{dialog.object}.getWindow(windowName);
Arguments
- windowNamestring
The window name.
Returns
- resultobjectboolean
Returns the JavaScript object for the requested window. If the window does not exist, returns false.
Description
Get a pointer to a window.
Discussion
The window must be explicitly named.
Example
//Get a pointer to a window called 'WINDOW1', then close the window var myWindow = {dialog.object}.getWindow('WINDOW1'); if (myWindow) { myWindow.hide(); }
If the requested window does not exist, getWindow() will return false. You should always check the returned value of the getWindow() method before using the object. This can be done by wrapping your code in an if block as shown in the example.
See Also